<template>
	<div style="padding:0px;">
		<el-form :model="dialogForm"  ref="dialogForm" :rules="rules" :label-width="formLabelWidth">
			<el-tabs v-model="activeName" type="card" >
				<el-tab-pane label="图片信息" name="1">
			    	<el-form-item label="上游购销合同" >
				      	 <qiniu :qiniuImage="qiniuImage"  :packJson="packJson" :id="qiniuImage.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="定金凭证" >
				     <qiniu  :qiniuImage="qiniuImage1"  :packJson="packJson" :id="qiniuImage1.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="供应商收款账号" >
				     <qiniu  :qiniuImage="qiniuImage2"  :packJson="packJson" :id="qiniuImage2.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="提车地址及联系人"  >
				      <qiniu  :qiniuImage="qiniuImage3"  :packJson="packJson1" :id="qiniuImage3.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="补充图片"  >
				    <qiniu   :qiniuImage="qiniuImage6" :id="qiniuImage6.id" :canDelete="false"></qiniu>
				    </el-form-item>
			    </el-tab-pane>
			    <el-tab-pane label="基本信息" name="2">
			    	<el-form-item label="订单号"  class="half">
				      <el-input  v-model="dialogForm.orderNumber" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="申请时间"  class="half">
				      <el-input  v-model="dialogForm.addTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>

                    <el-form-item label="订单状态"  class="half"> 
                     <el-input  v-model="dialogForm.orderStatusVO" auto-complete="off" disabled ></el-input>    
				    </el-form-item>

                    <el-form-item label="订单类型"  class="half"> 
                     <el-input  v-model="dialogForm.typeCH" auto-complete="off" disabled ></el-input>            
				    </el-form-item>
                    <el-form-item label="经销商名称"  >
				      <el-input  v-model="dialogForm.dealerInfoVO.name" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="汽车车型" >
				      <el-input  v-model="dialogForm.carBrandName" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
                    <el-form-item label="汽车数量"  class="half">
				      <el-input  v-model="dialogForm.amount" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="汽车颜色"  class="half">
				      <el-input  v-model="dialogForm.color" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
                    <el-form-item label="购车总价格"  class="currency" >
				      <el-input  :value="dialogForm.totalPrice|toFixed2" auto-complete="off" :disabled="true" ></el-input>
				      <span class="convertCurrency">{{dialogForm.totalPrice|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="垫资金额"  class="currency">
				      <el-input  :value="dialogForm.paymentAmount|toFixed2" auto-complete="off" :disabled="true" ></el-input>
				      <span class="convertCurrency">{{dialogForm.paymentAmount|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="定金金额"  class="currency">
				      <el-input  :value="dialogForm.earnest|toFixed2" auto-complete="off" :disabled="true" ></el-input>
				      <span class="convertCurrency">{{dialogForm.earnest|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="保证金金额"  class="currency">
				      <el-input  :value="dialogForm.deposit|toFixed2" auto-complete="off" :disabled="true" ></el-input>
				      <span class="convertCurrency">{{dialogForm.deposit|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="垫资比例"  class="half" prop="earnest">
				    	<el-input type="text" :value="(((dialogForm.paymentAmount-0)/(dialogForm.totalPrice-0)*100).toFixed(2))+'%'"  min="0" max="99999999" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    
				    <el-form-item label="当前利率"  class="half">
				      <el-input  :value="(dialogForm.interestRate||''-0).toFixed(4)" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>  
				    <el-form-item label="借款时长"  prop="durationId"  class="half"> 
				    	  <el-input  v-model="dialogForm.description" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
                    <el-form-item label="地推员"  class="half"> 
				     <el-input  v-model="dialogForm.dituiUser" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				      <el-form-item label="业务员"   class="half"> 
				      <el-input  v-model="dialogForm.yewuUser" auto-complete="off" disabled ></el-input>    
				    </el-form-item>
                    <el-form-item label="指导价/配置" >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.carConfig" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
                    <el-form-item label="价格审核备注"  >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.priceRemark" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="补充说明"  >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.supplementExplain" auto-complete="off" disabled ></el-input>
				    </el-form-item>
			    </el-tab-pane>
			    <el-tab-pane label="上游供应商信息" name="3">
			    	<el-form-item label="合同上游名称" >
				      <el-input  v-model="dialogForm.supplierName" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				  	
				    <el-form-item label="提车详细地址" >
				      <el-input  :value="dialogForm.supplierProvince+dialogForm.supplierCity+dialogForm.supplierAddress" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				  	<el-form-item label="提车联系人" >
				      <el-input  v-model="dialogForm.supplierPerson" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="联系人手机号" >
				      <el-input  v-model="dialogForm.supplierPhone" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="收款帐户名1" >
				      <el-input  v-model="dialogForm.accountName" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="开户行名称1" >
				      <el-input  v-model="dialogForm.openningBank" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				  	<el-form-item label="收款账号1" >
				      <el-input  v-model="dialogForm.accountNumber" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    
				    <el-form-item label="收款账户名2"  >
				      <el-input    v-model="dialogForm.accountNameBak" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="开户行名称2"  > 
				      <el-input   v-model="dialogForm.openningBankBak" auto-complete="off" disabled ></el-input>
				    </el-form-item>
			    	<el-form-item label="收款账号2"  >
				      <el-input    v-model="dialogForm.accountNumberBak" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    
				   
				  	<el-form-item label="打款备注" >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.remark" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    
			    </el-tab-pane>
			    <el-tab-pane label="初审结果" name="4">
			    	<el-form-item label="上游购销合同审核结果"  >
				      <el-input   :maxlength="50"  v-model="dialogForm.orderAuditResults.upperReacherExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="定金凭证审核结果"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.earnestExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="供应商名称"  >
				      <el-input  :maxlength="50" v-model="dialogForm.orderAuditResults.supplierEstablishName" auto-complete="off" disabled ></el-input>
				    </el-form-item> 
				     <el-form-item label="供应商成立日期"  >
				     	<el-input  :value="dialogForm.orderAuditResults.supplierEstablishTime|parseTime('{y}-{m}-{d}')" auto-complete="off" disabled ></el-input>
				     	
				     	
				      <!-- <el-input  v-model="dialogForm.orderAuditResults.supplierEstablishTime" auto-complete="off" disabled ></el-input> -->
				    </el-form-item>
				     <el-form-item label="供应商审核结果"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.establishExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="供应商资质图片"  >
				     	<qiniu  :qiniuImage="qiniuImage4"  :packJson="packJson2" :id="qiniuImage4.id" :canDelete="false"></qiniu>
				    </el-form-item>
				     <el-form-item label="资源商名称"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.resourceProviderName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商成立日期"  >
				     	
				       <el-input  :value="dialogForm.orderAuditResults.resourceProviderEstablishTime|parseTime('{y}-{m}-{d}')" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商审核结果"  >
				      <el-input   :maxlength="50" v-model="dialogForm.orderAuditResults.resourceProviderExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商资质图片"  >
				     	<qiniu  :qiniuImage="qiniuImage5"  :packJson="packJson2" :id="qiniuImage5.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    
				    <el-form-item label="提车地址审核结果"   >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.carAddressExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="资料更改记录"  >
				      <el-input  :maxlength="100"  type="textarea" :rows=3 v-model="dialogForm.dataChangeRecord" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="审核人员"  class="half" >
				      <el-input  v-model="dialogForm.orderAuditResults.firstExamineResultName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="审核时间"  class="half" >
				      <el-input  v-model="dialogForm.orderAuditResults.firstExamineResultTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>

			    </el-tab-pane>
			    <el-tab-pane label="二审及合同" name="5">
			    	<h3>二审信息</h3>
			    	<el-form-item label="车辆资料相关证明(打款证明)"  >
				   	   <qiniu  :qiniuImage="qiniuImage7"  :packJson="packJson1" :id="qiniuImage7.id" :canDelete="false"></qiniu> 
				    </el-form-item>
				 
				    <el-form-item label="车辆相关信息审核结果" >
				      <el-input  :maxlength="50" v-model="dialogForm.orderAuditResults.carInformationExamineResult" auto-complete="off"    disabled></el-input>
				    </el-form-item>
				    <el-form-item label="预计手续寄送日期"   >
				        <el-input   :value="dialogForm.orderAuditResults.proceduresSendTime|parseTime('{y}-{m}-{d}')" auto-complete="off"    disabled></el-input>
				    </el-form-item>
				    <el-form-item label="钥匙数量"  >
				      <el-input type="number" v-model.number="dialogForm.orderAuditResults.keyCount" auto-complete="off" disabled> </el-input>
				    </el-form-item>
				    <el-form-item label="具体钥匙情况"  >
				      <el-input :maxlength="50" v-model="dialogForm.orderAuditResults.keySituation" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="审核结果"  >
				      <el-input :maxlength="100" type="textarea" :rows=3 v-model="dialogForm.secondReviewRemark" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="审核人员" >
				      <el-input v-model="dialogForm.orderAuditResults.secondExamineResultName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="审核时间"  >
				      <el-input  v-model="dialogForm.orderAuditResults.secondExamineResultTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <h3>合同信息</h3>
				    <el-form-item label="资金方"  > 
				    	<el-input  v-model="dialogForm.funderName" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="SPV"  > 
				    	<el-input  v-model="dialogForm.spvName" auto-complete="off" :disabled="true" ></el-input>
				    </el-form-item>
				    <el-form-item label="合同信息列表" >
				      <el-table :data="dialogForm.templateInfoListVO" border  >
						    <el-table-column label="合同名称" width="140" >
						      <template scope="scope">
						        <span >{{ scope.row.outName }}</span>
						      </template>
						    </el-table-column>
						    <el-table-column label="合同别名" width="140" >
						      <template scope="scope">
						        <span >{{ scope.row.name }}</span>
						      </template>
						    </el-table-column>
						    <el-table-column label="合同状态" width="140" >
						      <template scope="scope">
						        <span >{{ scope.row.statusCH }}</span>
						      </template>
						    </el-table-column>
						</el-table>

				    </el-form-item>
			    </el-tab-pane> 
			    <el-tab-pane label="物流验车" name="6">
			    	<h3>物流信息</h3>
				  	<el-form-item label="物流公司"   >
				        <el-input v-model="dialogForm.logisticsCompany.name" auto-complete="off" disabled>
				        </el-input>
				    </el-form-item>
				    <el-form-item label="验车司机信息"  >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.logisticsInfo.driverInfo" auto-complete="off" disabled></el-input>
				    </el-form-item>
				   
					<el-form-item label="运输目的地"  >
				      <el-input  :value="(dialogForm.logisticsInfo.province||'') +(dialogForm.logisticsInfo.city||'')+(dialogForm.logisticsInfo.county||'')+(dialogForm.logisticsInfo.destination||'')" auto-complete="off" disabled ></el-input><!-- maxlength=5 -->
				    </el-form-item>
				    <el-form-item label="物流费"   class="currency">
				      <el-input  :value="(dialogForm.logisticsInfo.logisticsFee||0)|toFixed2" auto-complete="off" disabled></el-input>
				      <span class="convertCurrency">{{dialogForm.logisticsInfo.logisticsFee|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="放空费用"   class="currency">
				      <el-input  :value="(dialogForm.logisticsInfo.basicFee||0)|toFixed2" auto-complete="off" disabled></el-input>
				      <span class="convertCurrency">{{dialogForm.logisticsInfo.basicFee|convertCurrency}}</span>
				    </el-form-item>
				     <el-form-item label="预计验车时间(小时)"   class="half">
				      <el-input v-model="dialogForm.logisticsInfo.estimatedInspectTime" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <el-form-item label="预计运输时间(天)"   class="half">
				      <el-input v-model="dialogForm.logisticsInfo.estimeatedDays" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <el-form-item label="公里数"  >
				      <el-input  v-model="dialogForm.logisticsInfo.mileage" auto-complete="off" disabled></el-input>
				    </el-form-item>
				     <el-form-item label="添加人"  >
				      <el-input  v-model="dialogForm.logisticsInfo.addOperator" auto-complete="off" disabled></el-input>
				    </el-form-item>
				     <el-form-item label="添加时间"  >
				      <el-input  :value="dialogForm.logisticsInfo.addDate|parseTime" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <h3>物流确认</h3>
				     <el-form-item label="物流状态"  >
				      <el-input  :value="dialogForm.logisticsCH" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <el-form-item label="确认备注"  >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.logisticsInfo.comment" auto-complete="off" disabled :maxlength="100" ></el-input>
				    </el-form-item>	
				      <el-form-item label="确认时间"  >
				      <el-input  :value="dialogForm.logisticsInfo.confirmDate" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <h3>验车信息</h3>
				    <el-form-item label="验车图片"  >
				       <qiniu  :qiniuImage="qiniuImage8"  :id="qiniuImage8.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="车架号"  prop="vin">
				       <el-input type="textarea" :rows=3 v-model="dialogForm.carInspectionInfo.vin" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <el-form-item label="生产年月" >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.carInspectionInfo.productionDate" auto-complete="off" disabled></el-input>
				    </el-form-item>
				  	<el-form-item label="备注信息" >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.carInspectionInfo.remark" auto-complete="off" disabled></el-input>
				       </el-form-item>
				     <el-form-item label="添加人"  >
				      <el-input  :value="dialogForm.carInspectionInfo.createPerson" auto-complete="off" disabled></el-input>
				    </el-form-item>
				     <el-form-item label="添加时间"  >
				      <el-input  :value="dialogForm.carInspectionInfo.createTime|parseTime" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <h3>验车确认</h3>
				     <el-form-item label="验车状态"  >
				      <el-input  :value="dialogForm.carInspectionCH" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <el-form-item label="确认备注"  >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.carInspectionInfo.confirmRemark" auto-complete="off" disabled :maxlength="100" ></el-input>
				    </el-form-item>	
				      <el-form-item label="确认时间"  >
				      <el-input  :value="dialogForm.carInspectionInfo.confirmDate" auto-complete="off" disabled></el-input>
				    </el-form-item>
                     <el-form-item label="提车跟踪状态"  >
				      <el-input  :value="dialogForm.logisticsFollowCH" auto-complete="off" disabled></el-input>
				    </el-form-item>

			    </el-tab-pane>
			    <el-tab-pane label="保证金及终审" name="7">
			    	<h3>保证金信息</h3>
			    	<el-form-item label="保证金金额" >
				      <el-input :value="dialogForm.deposit|toFixed2" auto-complete="off" class="currency" disabled></el-input>
				      <span class="convertCurrency">{{dialogForm.deposit|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="保证金凭证照片" >
				      <qiniu  :qiniuImage="qiniuImage9"   :id="qiniuImage9.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="添加时间" >
				      <el-input v-model="dialogForm.cashDepositInfo.addTime" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    <h3>保证金审核</h3>
				    <el-form-item label="审核备注"  prop="reviewRemark">
				      <el-input type="textarea" :rows=3 v-model="dialogForm.cashDepositInfo.reviewRemark" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="给资金方凭证" >
				      <qiniu  :qiniuImage="qiniuImage10"  :id="qiniuImage10.id" :canDelete="false"></qiniu>
				    </el-form-item>	
				    <el-form-item label="保证金状态"   >
				    	<el-input  v-model="dialogForm.cashDepositCH" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="确认时间"   >
				    	<el-input  v-model="dialogForm.cashDepositInfo.auditTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="确认人"   >
				    	<el-input  v-model="dialogForm.cashDepositInfo.auditPerson" auto-complete="off" disabled ></el-input>
				    </el-form-item>
                    <h3>终审信息</h3>
                    <el-form-item label="审核信息"  prop="isPass" >
				      <el-radio-group v-model.number="dialogForm.isPass" :disabled="!dialogSendData.isAdd">
					      <el-radio :label="'true'"  >通过</el-radio>
					      <el-radio :label="'false'"  >不通过</el-radio>
					  </el-radio-group>
				    </el-form-item>
				    <el-form-item label="打款金额"  class="currency" prop="remitAccountMoney" :rules="this.dialogForm.isPass=='true'?rules.priceRemark:[{ required: false}]">
				      <el-input v-model="dialogForm.remitAccountMoney" @blur="FormatTwo('remitAccountMoney')" auto-complete="off" :disabled="!dialogSendData.isAdd" :maxlength="12"></el-input>
				      <span class="convertCurrency">{{dialogForm.remitAccountMoney|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="审核备注"  ><!-- prop="finalReviewRemark" -->
				      <el-input type="textarea" :rows=3 v-model="dialogForm.finalReviewRemark" auto-complete="off" :maxlength="100" :disabled="!dialogSendData.isAdd"></el-input>
				    </el-form-item>
				    <!-- <el-form-item label="审核时间"   >
				    	<el-input  :value="dialogForm.finalReviewTime | parseTime " auto-complete="off"  ></el-input>
				    </el-form-item>
				    <el-form-item label="审核人"   >
				    	<el-input  v-model="dialogForm.finalReviewPerson" auto-complete="off"  ></el-input>
				    </el-form-item> -->
			    </el-tab-pane>
			   
			</el-tabs>
			<div style="text-align:right;margin-top:15px;">
				 <el-button @click="returnBack">返 回</el-button>
				 <el-button  v-if="dialogSendData.isAdd&&activeName==7" type="primary" @click="submitConfirmForm('dialogForm')">提 交</el-button>
			</div>
		</el-form>
	</div>
</template>

<script >
    import qiniu from '@/views/qiniu/upload';
    import agentHttp from '@/utils/agentHttp.js';
    import countySelect from '@/views/countySelect/index.vue';
     import {require,prop,phone,decimalTwo,decimalFour,isChinese,length30,length100,decimal,max100,maxTenInt} from '@/utils/rules.js';
	export default{
		created(){
           this.queryAuditOrderInfo();
        },
		props:['tableData','dialogSendData'],
		components:{qiniu,countySelect},
		data(){
			return{
				contact:{data:[{orderNumber:1}]},
				formLabelWidth:'170px',
				//弹窗或者查看页面信息
		        dialogForm:{
		        	logisticsInfo:{},
		        	dealerInfoVO:{},
		        	status:[],
		            orderAuditResults:{},
		            orderRepayment:{},
		        	cashDepositInfo:{},
		        	carInspectionInfo:{},
		        	logisticsCompany:{},
					imagUrl:[],
					imagUrl1:[],
					imagUrl2:[],
					imagUrl3:[],
					imagUrl4:[],
					imagUrl5:[],
					imagUrl6:[],
					imagUrl7:[],
					imagUrl8:[],
					imagUrl9:[],
					imagUrl10:[],
					isPass:""
		        },
		        //资金方
			    selectFunder:[],
				//spv
				selectSpvUser:{},
				orderType:{},
				yewuyuan:{},
				ditui:{},
		        rules: {
		        	isPass:[{ required: true, message: '请选择审核信息', trigger: 'change' }],
		        	finalReviewRemark:[require('审核备注',{trigger:"blur"})],
		        	remitAccountMoney:[{required:true,message: '请输入正确的打款金额',trigger:"blur"},{ validator: decimalTwo, trigger: "blur"}]		        	
		        },
		        dialogImageUrl:"",
		        dialogVisible:false,
		        activeShow:false,
		        activeName:"7",
		          //七牛图片上传
			        qiniuImage:{
			        	id:"qiniuImage", //图片预览的id   
			        	image_uri:[],    //图片上传的列表  只含有url地址
			        },
			        
			        qiniuImage1:{
			        	id:"qiniuImage1",    
			        	image_uri:[]
			        },
			        
			        qiniuImage2:{
			        	id:"qiniuImage2",    
			        	image_uri:[]
			        },
			        
			        qiniuImage3:{
			        	id:"qiniuImage3",    
			        	image_uri:[]
			        },
			        
			        qiniuImage4:{
			        	id:"qiniuImage4",    
			        	image_uri:[]
			        },
			        qiniuImage5:{
			        	id:"qiniuImage5",    
			        	image_uri:[]
			        },
			        qiniuImage6:{
			        	id:"qiniuImage6",    
			        	image_uri:[]
			        },
			         qiniuImage7:{
			        	id:"qiniuImage7",    
			        	image_uri:[]
			        },
			         qiniuImage8:{
			        	id:"qiniuImage8",    
			        	image_uri:[]
			        },
			          qiniuImage9:{
			        	id:"qiniuImage9",    
			        	image_uri:[]
			        },
			          qiniuImage10:{
			        	id:"qiniuImage10",    
			        	image_uri:[]
			        },
			        packJson:{
						maxLength:6,   //最大图片数量
						accept:"",//image/gif,image/jpeg,image/jpg,image/png如果是这些，可以不传此参数
						size:4    //图片大小  单位兆
					},
			        
			        packJson1:{
						maxLength:3,   
						accept:"",
						size:4    
					},
			        packJson2:{
						maxLength:10,   
						accept:"",
						size:4    
					}
			}
		},
		methods:{
			
			FormatTwo(val){
				if((((this.dialogForm[val]||"")-0).toFixed(2)!='NaN')&&((this.dialogForm[val]-0).toFixed(2).length<=12)){
					this.dialogForm[val] = ((this.dialogForm[val]||"")-0).toFixed(2)
				}else{
					this.dialogForm[val]="";
					this.$message.warning('请输入正确的打款金额,整数位最多9位!')
				}
		    },
			returnBack(){
				this.dialogSendData.dialogFormVisible=false;
			},
			submitConfirmForm(formName){
                this.$refs[formName].validate((valid) => {
		          if (valid) {
		          		this.finalReview();
		          } else {
		           this.$nextTick(()=>{
		          	   this.$message.warning(document.getElementsByClassName('el-form-item__error')[0].innerText);
		               return false;
		            })
		          }
		        });
			},
           //获取订单数据
		    queryAuditOrderInfo(){  
			  agentHttp.get('adminApi/admin/car_order_decision/select_order/'+this.dialogSendData.id).then((data)=>{
		            if(data.success){  
		              this.dialogForm =  data.data;
		              this.$set(this.dialogForm,'isPass','');  
		              if(this.dialogForm.orderAuditResults == null){
		              	 this.dialogForm.orderAuditResults = {}; 
		              }else{
		              	this.dialogForm.orderAuditResults.examineAptitudePic?this.qiniuImage4.image_uri=this.dialogForm.orderAuditResults.examineAptitudePic.split(',').notempty():"";
		            	this.dialogForm.orderAuditResults.resourceProviderPic?this.qiniuImage5.image_uri=this.dialogForm.orderAuditResults.resourceProviderPic.split(',').notempty():"";
		            	this.dialogForm.orderAuditResults.carInformationPic?this.qiniuImage7.image_uri=this.dialogForm.orderAuditResults.carInformationPic.split(',').notempty():"";
		              }     
		              if (this.dialogForm.logisticsInfo==null) {
		              	this.dialogForm.logisticsInfo={};
		              }
		              if (this.dialogForm.logisticsCompany==null) {
		              	this.dialogForm.logisticsCompany={};
		              }
		              if (this.dialogForm.carInspectionInfo==null) {
		              	this.dialogForm.carInspectionInfo={};
		              }else{
		              	this.dialogForm.carInspectionInfo.pic?this.qiniuImage8.image_uri=this.dialogForm.carInspectionInfo.pic.split(',').notempty():"";
		              }
		              if (this.dialogForm.cashDepositInfo==null) {
		              	this.dialogForm.cashDepositInfo={};
		              }else{
		              		this.dialogForm.cashDepositInfo.voucherPic?this.qiniuImage9.image_uri=this.dialogForm.cashDepositInfo.voucherPic.split(',').notempty():"";
		              		this.dialogForm.cashDepositInfo.dealerRemittanceImag?this.qiniuImage10.image_uri=this.dialogForm.cashDepositInfo.dealerRemittanceImag.split(',').notempty():"";
		              }
		              if (this.dialogForm.dealerInfoVO==null) {
		              	this.dialogForm.dealerInfoVO={};
		              }
		              if (this.dialogForm.orderRepayment==null) {
		              	  this.dialogForm.orderRepayment={};
		              }


		             
		              //加载图片
		                this.dialogForm.contracts?this.qiniuImage.image_uri= this.dialogForm.contracts.split(',').notempty():"";
		            	this.dialogForm.depositPic?this.qiniuImage1.image_uri= this.dialogForm.depositPic.split(',').notempty():"";
		            	this.dialogForm.supplierInfoPic?this.qiniuImage2.image_uri= this.dialogForm.supplierInfoPic.split(',').notempty():"";
		            	this.dialogForm.supplierAddressPic?this.qiniuImage3.image_uri= this.dialogForm.supplierAddressPic.split(',').notempty():"";
		            	this.dialogForm.supplementPic?this.qiniuImage6.image_uri= this.dialogForm.supplementPic.split(',').notempty():"";
		            	if (this.dialogForm.status==140) {
		            		this.dialogForm.check=true;
		            	}else{
		            		this.dialogForm.check=false;
		            	}
		            	this.dialogForm.remitAccountMoney=((this.dialogForm.paymentAmount-0)+(this.dialogForm.deposit-0)).toFixed(2)
		            	
		            } 
		        })
		    	 
		    },
		    //终审
		   finalReview(){
		   	    if((this.dialogForm.remitAccountMoney-0)<(this.dialogForm.paymentAmount-0)){
                    this.$message.warning('终审打款金额不能小于垫资金额');
                    return false;
		   	    }
		   	    
		   		var params = {};
		   		params.id = this.dialogSendData.id;
		   		params.isPass = this.dialogForm.isPass;
		   		params.remitAccountMoney = this.dialogForm.remitAccountMoney;
		   		params.finalReviewRemark = this.dialogForm.finalReviewRemark;
		   		agentHttp.postJson('adminApi/admin/car_order/final_review',params).then((data)=>{
			    	this.$emit('refreshSeachData');
	            	this.$message.success(data.data||"提交成功");
	            	setTimeout(()=>{
	            		this.dialogSendData.dialogFormVisible=false;
	            	},500);
			    })
		   }

		}
	};
</script>

